package com.jxdinfo.hussar.example.common.schedulingtask;

import com.jxdinfo.hussar.example.common.schedulingtask.service.SysStruService;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


/**
 * @Author QiaoBin
 * @Date 2024/4/02 15:49
 * @Description  md_client客户表的定时任务
 */
@Component
@AllArgsConstructor
public class SysStruScheduleTask {

    @Autowired
    private SysStruService sysStruService;

    private static final Logger logger = LoggerFactory.getLogger(SysStruScheduleTask.class);

    @Scheduled(cron = "0 0 0 * * ?")  //凌晨0点执行一次
//    @Scheduled(cron = "0/30 * * * * ?")  //30秒执行一次
    public void mdClientTask() {
        sysStruService.manualSynchronization();
    }
}
